package com.jiaoshouMr.ethereum.controller;

import com.jiaoshouMr.ethereum.service.EthService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Api(value = "以太坊")
@RestController
@Slf4j
@RequestMapping("eth")
public class EthereumController {
    @Autowired
    private EthService ethService;

    @ApiOperation("获取以太坊账号")
    @GetMapping("account/{ghostId}/{type}")
    public Map<String, Object> getaccount(@ApiParam(value = "小鬼id", required = true) @PathVariable("ghostId") String ghostId,
                          @ApiParam(value = "币种类型", required = true) @PathVariable("type") String type) {
        return ethService.getAccount(ghostId,type);
    }


}
